Method and apparatus for accelerating hyperspectral video reconstruction

ABSTRACT

A method for accelerating hyperspectral video reconstruction includes steps of: acquiring, according to a spectral video and an RGB video captured by a hyperspectral video camera, a calibration matrix of the spectral video and the RGB video; sorting the calibration matrix to generate an ordered calibration matrix; converting, according to the ordered calibration matrix, the spectral video and the RGB video into a data matrix in a parallel manner; acquiring all related calibration points of a reconstruction region according to the ordered calibration matrix; and, reconstructing a hyperspectral video in a parallel manner according to the related calibration points and the data matrix. The related calibration points are acquired by sorting the calibration matrix, such that the number of times the calibration matrix is traverse is reduced, and the computation amount of hyperspectral video reconstruction is decreased.

TECHNICAL FIELD

The present invention relates to the field of computational photography,and in particular to a method and apparatus for acceleratinghyperspectral video reconstruction.

BACKGROUND OF THE PRESENT INVENTION

Recently, with the continuous innovation of the hyperspectral imagingtechnology in software and hardware research, hyperspectral imaging hasplayed an important role in many fields such as aerial remote sensing,chemical analysis and environmental monitoring.

In order to realize more accurate data, more stable performance andhigher speed of hyperspectral imaging, some methods for acceleratinghyperspecral video reconstruction have been proposed. Commonhyperspectral video reconstruction algorithms are generally into twocategories.

The first category of these methods is data optimization, where thespectral data to be reconstructed is optimized mainly by featureextraction, principal component analysis, dimension compression or othermethods, and the hyperspectral video is reconstructed and computed byusing the optimized spectral data after the duplicate data is removed toreserve main features. The acceleration effect is achieved by reducingthe computation of redundant data. Such methods will take a long timefor preprocessing and data optimization, and cannot transfer in realtime the preprocessed spectral data to a next step for hyperspectralvideo reconstruction.

The second category of these methods is parallel computing, wherehyperspectral video reconstruction algorithms are mainly executed in atemporal parallel or spatial parallel computing manner, therebyachieving the acceleration effect. However, the linear storage ofspectral calibration data is not taken into consideration in suchmethods, many invalid computations are performed during thehyperspectral video reconstruction, resulting in the waste of time.

Therefore, during the acceleration of hyperspectral videoreconstruction, the preprocessing speed is low due to the huge amount ofdata of RGB video and spectral video. Moreover, it is necessary toperform reconstruction in an effective region with reference to thespectral calibration data, and the spectral calibration data that hasnot been optimized in storage structure is put into a parallel memoryfor computing, so that many invalid computations will be added duringthe hyperspectral video reconstruction and the reconstruction time islonger. The method to solve the problem of the huge amount of data andslow spectral calibration data traversal is to use cropped or sampledspectral video and RGB video to decrease the number of spatial pixels,thereby reducing the amount of data, reducing the reconstruction rangeof the hyperspectral video, reducing the amount of spectral calibrationdata to be traversed and increasing the traversal speed. However, theacceleration problem cannot be completely solved by cropping or samplingthe spectral video and RGB video. Particularly when a hyperspectralcamera needs to collect high-speed dynamic targets and large-areacomplex scenes, it is difficult to reconstruct high-resolution andhigh-accuracy hyperspectral video.

SUMMARY OF THE PRESENT INVENTION

In order to accelerate hyperspectral video reconstruction while ensuringthat the accuracy of hyperspectral data and the resolution ofhyperspectral images remain unchanged, the present invention provides amethod and apparatus for accelerating hyperspectral videoreconstruction.

The method of the present invention employs the following technicalsolutions.

A method for accelerating hyperspectral video reconstruction isprovided, including steps of:

S1: acquiring, according to a spectral video and an RGB video capturedby a hyperspectral video camera, a calibration matrix of the spectralvideo and the RGB video;

S2: sorting, according to the conditional constraint of spatialdown-sampling in the hyperspectral video camera, the calibration matrixto generate an ordered calibration matrix;

S3: converting, according to the ordered calibration matrix, thespectral video and the RGB video into a data matrix in a parallelcomputing manner;

S4: acquiring all related calibration points of a reconstruction regionaccording to the ordered calibration matrix; and

S5: reconstructing a hyperspectral video in a parallel computing manneraccording to the related calibration points and the data matrix.

Further, in the step S1, the specific process of acquiring a calibrationmatrix of the spectral video and the RGB video is:

placing two-dimensional spatial coordinates of the first vertex of eachcalibration rectangle of the spectral video into a first-dimensionalcolumn vector, placing two-dimensional spatial coordinates of the fourthvertex of each calibration rectangle of the spectral video into asecond-dimensional column vector, and placing two-dimensional spatialcoordinates of each calibration point of the RGB video into athird-dimensional column vector; and, combining the first-dimensionalcolumn vector, the second-dimensional column vector and thethird-dimensional column vector to form a three-dimensional columnvector matrix after they are placed, and using the three-dimensionalcolumn vector matrix as a calibration matrix.

Further, in the step S2, the specific process of generating an orderedcalibration matrix is:

distributing spatial down-sampling points of the hyperspectral videocamera in the RGB video by using two-dimensional spatial coordinates (x,y), and sorting the calibration matrix according to the distributionrule of the spatial down-sampling points;

longitudinally sorting the calibration matrix by using a quick sortingalgorithm for two-dimensional space, i.e., longitudinally sorting thewhole calibration matrix by using the quick sorting algorithm bycomparing the size of the y-coordinate value of the third-dimensionalcolumn vector; and, transversely sorting the calibration matrix, i.e.,transversely sorting the whole calibration matrix by the quick sortingalgorithm by comparing the size of the x-coordinate value of thethird-dimensional column vector;

generating two M×N ordered calibration matrices according to the numberof rows M and the number of columns N of the spatial down-samplingpoints of the hyperspectral video camera, placing the first orderedcalibration matrix in calibration data of the spectral video as aspectral ordered calibration matrix, putting the first-dimensionalcolumn vector and the second-dimensional column vector of the sortedcalibration matrix in the spectral ordered calibration matrix, setting aposition where the spectral ordered calibration matrix does not containthe spatial down-sampling points of the hyperspectral video camera to bezero, placing the second ordered calibration matrix in calibration dataof the RGB video as an RGB ordered calibration matrix, placing thethird-dimensional column vector of the sorted calibration matrix in theRGB ordered calibration matrix, and setting a position where the RGBordered calibration matrix does not contain the spatial down-samplingpoints of the hyperspectral video camera to be zero; and

according to the RGB ordered calibration matrix, computing transversedistance values between non-zero data points among half of mark points,and recording an average of the transverse distance values as atransverse distance between adjacent calibration points; and, computinglongitudinal distance values between non-zero data points among half ofmark points, and recording an average of the longitudinal distancevalues as a longitudinal distance between adjacent calibration points.

Further, in the step S3, the specific process of acquiring a data matrixis:

acquiring the midpoint of the transverse position of each calibrationrectangle according to the spectral ordered calibration matrix;acquiring the longitudinal length of each calibration rectangleaccording to the spectral ordered calibration matrix; accelerating thegeneration of the spectral data matrix in a parallel computing manner inthe spectral video; accelerating the synthesis of the RGB data matrix ina parallel computing manner according to the RGB video; and, combiningthe spectral data matrix and the RGB data matrix to form a data matrix.

Further, in the step S4, the specific process of acquiring relatedcalibration points is:

computing a reconstruction range of each reconstruction point accordingto the transverse distance between adjacent calibration points and thelongitudinal distance between adjacent calibration points, and directlyindexing the RGB ordered calibration matrix to obtain all relatedcalibration points of each reconstruction point of the RGB data matrix.

The present invention provides an apparatus for acceleratinghyperspectral video reconstruction, including:

a calibration matrix acquisition module configured to acquire acalibration matrix of the captured spectral video and RGB video;

a calibration matrix sorting module configured to sort the calibrationmatrix;

an adjacent calibration point longitudinal computation unit configuredto compute an average transverse distance value between non-zero datapoints among half of mark points in an RGB ordered calibration matrix;

an adjacent calibration point transverse computation unit configured tocompute an average longitudinal distance value between non-zero datapoints among half of mark points in the RGB ordered calibration matrix;

an ordered calibration matrix generation module configured to generatean ordered calibration matrix according to spatial down-sampling pointsof a hyperspectral video camera;

a data matrix generation module configured to convert the spectral videoand the RGB video into a data matrix in a parallel manner according tothe ordered calibration matrix;

a spectral data parallel computation unit configured to copy a spectralordered calibration matrix and the spectral video into a parallelcomputation memory, and perform thread indexing to control thecomputation of each spectral data point;

an RGB data parallel computation unit configured to copy the RGB videointo the parallel computation memory and perform thread indexing tocontrol the computation of each RGB data point;

a calibration point acquisition module configured to acquire all relatedcalibration points of a reconstruction region according to the orderedcalibration matrix; and

a hyperspectral video reconstruction module configured to reconstruct ahyperspectral video in a parallel manner according to the relatedcalibration points and the data matrix.

In the present invention, by processing and optimizing spectral data andRGB data in a parallel manner and then transferring in real time thepreprocessed spectral data to a next step for hyperspectral videoreconstruction, the efficiency of hyperspectral video reconstruction isimproved. Meanwhile, the storage mode of the reconstruction spectralcalibration data is reconstructed from a linear space to atwo-dimensional space, so that the reconstruction related calibrationpoints can be directly traversed and indexed, thereby decreasing thenumber of times of traversing the calibration matrix and reducing thecomputation amount of hyperspectral video reconstruction. Compared withthe prior art, the method of the present invention can effectivelyacceleration of the hyperspectral video reconstruction without reducingthe accuracy and spatial resolution of the hyperspectral videoreconstruction.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to describe the technical solutions in the embodiments of thepresent invention or in the prior art more clearly, the accompanyingdrawings to be used in the descriptions of the embodiments or the priorart will be briefly introduced below. Apparently, the accompanyingdrawings to be described hereinafter are some of the embodiments of thepresent invention, and a person of ordinary skill in the art can obtainother accompanying drawings according to these drawings without payingany creative effort.

FIG. 1 is a flowchart of a method for accelerating hyperspectral videoreconstruction according to the present invention;

FIG. 2 is a schematic diagram of collecting spectral data and RGB databy a hyperspectral video camera;

FIG. 3 is a comparison diagram of acceleration of hyperspectral videoreconstruction according to Embodiment 1 of the present invention;

FIG. 4 is a single-band diagram of reconstructed (a) 500 nm, (b) 550 nm,(c) 600 nm, (d) 650 nm, (e) 700 nm and (f) 750 nm according toEmbodiment 1 of the present invention;

FIG. 5 is an evaluation diagram of reconstruction results of thereconstruction method according to Embodiment 1 of the presentinvention; and

FIG. 6 is a schematic structure diagram of an apparatus for acceleratinghyperspectral video reconstruction according to Embodiment 2 of thepresent invention.

DETAILED DESCRIPTION OF THE PRESENT INVENTION

In order to make the objectives, technical solutions and advantages ofthe present invention clearer, the implementations of the presentinvention will be further described below in detail with reference tothe accompanying drawings.

With reference to FIG. 1, the present invention provides a method foraccelerating hyperspectral video reconstruction, which is used toaccelerate hyperspectral video reconstruction. The method includes thefollowing specific steps.

S1: According to a spectral video and an RGB video captured by ahyperspectral video camera, a calibration matrix of the spectral videoand the RGB video is acquired. Specifically:

The two-dimensional spatial coordinates of the first vertex (upper left)of each calibration rectangle of the spectral video are placed into afirst-dimensional column vector, the two-dimensional spatial coordinatesof the fourth vertex (lower right) of each calibration rectangle of thespectral video are placed into a second-dimensional column vector, andthe two-dimensional spatial coordinates of each calibration point of theRGB video are placed into a third-dimensional column vector. Thefirst-dimensional column vector, the second-dimensional column vectorand the third-dimensional column vector are combined to form athree-dimensional column vector matrix after they are placed, and thethree-dimensional column vector matrix is used as a calibration matrix.

S2: The calibration matrix is sorted according to the conditionalconstraint of spatial down-sampling in the hyperspectral video camera togenerate an ordered calibration matrix.

Spatial down-sampling points of the hyperspectral video camera aredistributed in the RGB video by using two-dimensional spatialcoordinates (x, y), and the calibration matrix is sorted according tothe distribution rule of the spatial down-sampling points.

The calibration matrix is longitudinally sorted by using a quick sortingalgorithm (Quicksort) for two-dimensional space, that is, the wholecalibration matrix is longitudinally sorted by using the quick sortingalgorithm by comparing the size of the y-coordinate value of thethird-dimensional column vector; and then, the calibration matrix istransversely sorted, that is, the whole calibration matrix istransversely sorted by the quick sorting algorithm by comparing the sizeof the x-coordinate value of the third-dimensional column vector. Thespecific quick sorting algorithm is as follows:

QUICKSORT(A, l, r, f) ifp < r then p ← PARTITION(A, l, r, f)QUICKSORT(A, l, p − 1, f) QUICKSORT(A, p + 1, r, f)where A is the matrix to be sorted; p is the index of the fulcrumelement of the matrix and divides the matrix into two parts; l is theindex of the first element of the matrix; r is the index of the lastelement of the matrix; and, f is the flag bit for determining thesorting direction of the quick sorting algorithm for the two-dimensionalmatrix.

The PARTITION function is as follows:

PARTITION(A, l, r, f) x ← A[r].x y ← A[r].y i ← p − 1 for j ← p to r − 1if f ≤ 0 then do if A[j].x ≤ x then i ← i + 1 exchange A[i].x ←→ A[j].xexchange A[i + 1].x ←→ A[r].x return i + 1 if f > 0 then do if A[j].y ≤y then i ← i + 1 exchange A[i].y ←→ A[j].y exchange A[i + 1].y ←→ A[r].yreturn i + 1

where x is the longitudinal coordinate of the element to be compared, yis the horizontal coordinate of the element to be compared, i is theposition record index of the element smaller than x or j, and x is thematrix traversal index.

Two M ordered calibration matrices are generated according to the numberof rows N and the number of columns M×N of the spatial down-samplingpoints of the hyperspectral video camera. The first ordered calibrationmatrix is placed in calibration data of the spectral video as a spectralordered calibration matrix, the first-dimensional column vector and thesecond-dimensional column vector of the sorted calibration matrix areplaced in the spectral ordered calibration matrix, a position where thespectral ordered calibration matrix does not contain the spatialdown-sampling points of the hyperspectral video camera is set to bezero. The second ordered calibration matrix is placed in calibrationdata of the RGB video as an RGB ordered calibration matrix, thethird-dimensional column vector of the sorted calibration matrix isplaced in the RGB ordered calibration matrix, and a position where theRGB ordered calibration matrix does not contain the spatialdown-sampling points of the hyperspectral video camera is set to bezero.

According to the RGB ordered calibration matrix, transverse distancevalues between non-zero data points among half of mark points arecomputed, and an average of the transverse distance values is recordedas a transverse distance between adjacent calibration points; and,according to the RGB ordered calibration matrix, longitudinal distancevalues between non-zero data points among half of mark points arecomputed, and an average of the longitudinal distance values is recordedas a longitudinal distance between adjacent calibration points.

S3: The spectral video and the RGB video are converted into a datamatrix in a parallel computing manner according to the orderedcalibration matrix. Specifically:

The midpoint of the transverse position of each calibration rectangle isacquired according to the spectral ordered calibration matrix, and thelongitudinal length of each calibration rectangle is acquired accordingto the spectral ordered calibration matrix. The generation of thespectral data matrix is accelerated in a parallel computing manner inthe spectral video according to the midpoint and the longitudinallength. The synthesis of the RGB data matrix is accelerated in aparallel computing manner according to the RGB video, and the spectraldata matrix and the RGB data matrix are combined to form a data matrix.

S4: All related calibration points of a reconstruction region areacquired according to the ordered calibration matrix. Specifically:

A reconstruction range of each reconstruction point is computedaccording to the transverse distance between adjacent calibration pointsand the longitudinal distance between adjacent calibration points, andthe RGB ordered calibration matrix can be directly indexed to obtain allrelated calibration points of each reconstruction point of the RGB datamatrix.

S5: A hyperspectral video is reconstructed according to the relatedcalibration points and the data matrix, so that acceleration is realizedin a parallel computing manner.

Embodiment 1

The parameters of the devices for hyperspectral video reconstruction areas follows: processor: i7-4790K CPU@4 GHZ*8; memory: 32G; display card:GTX1080Ti; and, magnetic disc: 1T.

The parameters of the images for hyperspectral video reconstruction areas follows: wavelength range: 450 nm to 900 nm; spatial resolution:1465×959; spectral resolution: 3 nm; and, the number of spectra bands:143.

As shown in FIG. 2, a dynamic scene is photographed by a hyperspectralvideo camera, and the dynamic scene is divided into two light paths by aspectroscope. The first light path is reflected to an RGB camera, andthe second light path is transmitted to a mask for encoding, thendirected to a prism for dispersion, and finally directed to a spectralcamera. A spectral vide and an RGB video are transmitted to a serverthrough a data connection line and then computed by a hyperspectralvideo reconstruction algorithm, and a spectral image of a target band isdisplayed in real time.

As shown in FIG. 3, after the acceleration by the method of the presentinvention, the maximum acceleration ratio of the reconstruction of thehyperspectral video (1465×959×143) is about 75 times, and the frame rateof the reconstructed hyperspectral video is about 3 fps. With theincrease of the number of spectral reconstruction channels, thereconstruction time will be increased. In the case of a single channel,before acceleration, the reconstruction time is 1562 ms, and the framerate is about 0.6 frames; while after acceleration, the reconstructiontime is 20 ms, and the frame rate is about 50 frames. If the number ofspectral channels increases from a single channel to 143 channels,before acceleration, the reconstruction time is 20607 ms, and the framerate is about 0.04 frames; while after acceleration, the reconstructiontime is 336 ms, and the frame rate is about 3 frames.

With reference to FIG. 4, in accordance with the method of the presentinvention, the image of each band of the hyperspectral videoreconstruction is a high signal-to-noise ratio and clear texture, sothat the spectral characteristics of the target scene are betterrestored. There is a smooth transition among the spectral images of thebands, and there are no over-dark or over-exposure points, so that thespectral light characteristics of the target scene are satisfied.

With reference to FIG. 5, the results of hyperspectral videoreconstruction after acceleration in this embodiment are analyzed byusing objective evaluation indexes of image quality:

Root mean square error:

${{RMSE} = \sqrt{\frac{1}{W \times H}{\sum_{x = 1}^{W}{\sum_{y = 1}^{H}\left( {{g\left( {x,y} \right)} - {f\left( {x,y} \right)}} \right)^{2}}}}},$

where g represents the image to be evaluated, f represents the referenceimage, and W and H represent the width and height of the image,respectively. The root mean square errors of corresponding points in twoimages are computed. If the value of RMSE is smaller, the differencebetween the image to be evaluated and the reference image is smaller,that is, the quality of the image to be evaluated is better.

Structural similarity:

${{{SSIM}\left( {x,y} \right)} = \frac{\left( {{2\mu_{x}\mu_{y}} + c_{1}} \right)\left( {{2\sigma_{xy}} + c_{2}} \right)}{\left( {\mu_{x}^{2} + \mu_{y}^{2} + c_{1}} \right)\left( {\sigma_{x}^{2} + \sigma_{y}^{2} + c_{2}} \right)}},$

where x and y represent the image to be evaluated and the referenceimage, respectively; μ_(x) represents the mean in the direction of theimage to be evaluated x; μ_(y) represents the mean in the direction ofthe reference image y; σ_(xy) represents the covariance of x and y;σ_(x) ² and σ_(y) ² represents the variances of x and y, respectively;and, c₁ and c₂ are constants used to maintain stability. The SSIM rangesfrom 0 to 1. The larger the value of SSIM, the higher the similaritybetween images is, indicating that the quality of the image to beevaluated is better. The value of SSIM can better reflect the subjectiveperception of human eyes.

Peak signal-to-noise ratio: where

${MSE} = {\frac{1}{W \times H}{\sum_{x = 1}^{W}{\sum_{y = 1}^{H}{\left( {{g\left( {x,y} \right)} - {f\left( {x,y} \right)}} \right)^{2}.}}}}$

The smaller the value of MSE is, the larger the value of PSNR is, andthe better the quality of the image to be evaluated is. The PSNR is themost widely used method to evaluate the image quality, but the value of

P ⁢ S ⁢ N ⁢ R = 10 × log 10 ( ( 2 n - 1 ) 2 M ⁢ S ⁢ E )

cannot better reflect the subjective perception of human eyes.

Embodiment 2

With reference to FIG. 6, the present invention provides an apparatusfor accelerating hyperspectral video reconstruction, which is used toaccelerate hyperspectral video reconstruction. The apparatus includes:

a calibration matrix acquisition module 201 configured to acquire,according to a spectral video and an RGB video captured by ahyperspectral video camera, a calibration matrix of the spectral videoand the RGB video;

a calibration matrix sorting module 202 configured to sort thecalibration matrix by a quick sorting algorithm according to theconditional constraint of spatial down-sampling in the hyperspectralvideo camera;

an adjacent calibration point longitudinal computation unit 2021configured to compute an average transverse distance value betweennon-zero data points among half of mark points in an RGB orderedcalibration matrix;

an adjacent calibration point transverse computation unit 2022configured to compute an average longitudinal distance value betweennon-zero data points among half of mark points in an RGB orderedcalibration matrix;

an ordered calibration matrix generation module 203 configured togenerate two M matrix spaces according to the number of rows N and thenumber of columns M×N of spatial down-sampling points of thehyperspectral video camera and place the sorted calibrated points intothe matrix to generate an ordered calibration matrix;

a data matrix generation module 204 configured to convert the spectralvideo and the RGB video into a data matrix according to the orderedcalibration matrix so as to realize acceleration in a parallel computingmanner;

a spectral data parallel computation unit 2041 configured to copy aspectral ordered calibration matrix and the spectral video into aparallel computation memory, and perform thread indexing to control thecomputation of each spectral data point;

an RGB data parallel computation unit 2042 configured to copy the RGBvideo into the parallel computation memory and perform thread indexingto control the computation of each RGB data point;

a calibration point acquisition module 205 configured to acquire allrelated calibration points of a reconstruction region according to theordered calibration matrix; and

a hyperspectral video reconstruction module 206 configured toreconstruct a hyperspectral video according to the related calibrationpoints and the data matrix so as to realize acceleration in a parallelcomputing manner.

All or some of the above technical solutions in the embodiments of thepresent invention can be completed by instructing the related hardwarethrough programs, and the programs can be stored in a readable storagemedium. This storage medium includes: ROMs, RAMs, magnetic discs,optical discs or various mediums capable of storing program codes.

The forgoing description merely shows preferred embodiments of thepresent invention and is not intended to limit the present invention.Any modification, equivalent replacement and improvement made withoutdeparting from the spirit and principle of the present invention shallfall into the protection scope of the present invention.

1. A method for accelerating hyperspectral video reconstruction,comprising steps of: S1: acquiring, according to a spectral video and anRGB video captured by a hyperspectral video camera, a calibration matrixof the spectral video and the RGB video; S2: sorting, according to theconditional constraint of spatial down-sampling in the hyperspectralvideo camera, the calibration matrix to generate an ordered calibrationmatrix; S3: converting, according to the ordered calibration matrix, thespectral video and the RGB video into a data matrix in a parallelcomputing manner; S4: acquiring all related calibration points of areconstruction region according to the ordered calibration matrix; andS5: reconstructing a hyperspectral video in a parallel computing manneraccording to the related calibration points and the data matrix.
 2. Themethod for accelerating hyperspectral video reconstruction according toclaim 1, wherein the step S1 further comprises: placing two-dimensionalspatial coordinates of the first vertex of each calibration rectangle ofthe spectral video into a first-dimensional column vector, placingtwo-dimensional spatial coordinates of the fourth vertex of eachcalibration rectangle of the spectral video into a second-dimensionalcolumn vector, and placing two-dimensional spatial coordinates of eachcalibration point of the RGB video into a third-dimensional columnvector; and, combining the first-dimensional column vector, thesecond-dimensional column vector and the third-dimensional column vectorto form a three-dimensional column vector matrix after they are placed,and using the three-dimensional column vector matrix as a calibrationmatrix.
 3. The method for accelerating hyperspectral videoreconstruction according to claim 2, wherein the step S2 furthercomprises: distributing spatial down-sampling points of thehyperspectral video camera in the RGB video by using two-dimensionalspatial coordinates (x,y), and sorting the calibration matrix accordingto the distribution rule of the spatial down-sampling points;longitudinally sorting the calibration matrix by using a quick sortingalgorithm for two-dimensional space, i.e., longitudinally sorting thewhole calibration matrix by using the quick sorting algorithm bycomparing the size of the y-coordinate value of the third-dimensionalcolumn vector; and, transversely sorting the calibration matrix, i.e.,transversely sorting the whole calibration matrix by the quick sortingalgorithm by comparing the size of the x-coordinate value of thethird-dimensional column vector; generating two M×N ordered calibrationmatrices according to the number of rows M and the number of columns Nof the spatial down-sampling points of the hyperspectral video camera,placing the first ordered calibration matrix in calibration data of thespectral video as a spectral ordered calibration matrix, putting thefirst-dimensional column vector and the second-dimensional column vectorof the sorted calibration matrix in the spectral ordered calibrationmatrix, setting a position where the spectral ordered calibration matrixdoes not contain the spatial down-sampling points of the hyperspectralvideo camera to be zero, placing the second ordered calibration matrixin calibration data of the RGB video as an RGB ordered calibrationmatrix, placing the third-dimensional column vector of the sortedcalibration matrix in the RGB ordered calibration matrix, and setting aposition where the RGB ordered calibration matrix does not contain thespatial down-sampling points of the hyperspectral video camera to bezero; and according to the RGB ordered calibration matrix, computingtransverse distance values between non-zero data points among half ofmark points, and recording an average of the transverse distance valuesas a transverse distance between adjacent calibration points; and,computing longitudinal distance values between non-zero data pointsamong half of mark points, and recording an average of the longitudinaldistance values as a longitudinal distance between adjacent calibrationpoints.
 4. The method for accelerating hyperspectral videoreconstruction according to claim 3, wherein the step S3 furthercomprises: acquiring the midpoint of the transverse point of eachcalibration rectangle according to the spectral ordered calibrationmatrix; acquiring the longitudinal length of each calibration rectangleaccording to the spectral ordered calibration matrix; accelerating thegeneration of the spectral data matrix in a parallel computing manner inthe spectral video; accelerating the synthesis of the RGB data matrix ina parallel computing manner according to the RGB video; and, combiningthe spectral data matrix and the RGB data matrix to form a data matrix.5. The method for accelerating hyperspectral video reconstructionaccording to claim 4, wherein the step S4 further comprises: computing areconstruction range of each reconstruction point according to thetransverse distance between adjacent calibration points and thelongitudinal distance between adjacent calibration points, and directlyindexing the RGB ordered calibration matrix to obtain all relatedcalibration points of each reconstruction point of the RGB data matrix.6. An apparatus for accelerating hyperspectral video reconstruction,comprising: a calibration matrix acquisition module configured toacquire a calibration matrix of the captured spectral video and RGBvideo; a calibration matrix sorting module configured to sort thecalibration matrix; an adjacent calibration point longitudinalcomputation unit configured to compute an average transverse distancevalue between non-zero data points among half of mark points in an RGBordered calibration matrix; an adjacent calibration point transversecomputation unit configured to compute an average longitudinal distancevalue between non-zero data points among half of mark points in the RGBordered calibration matrix; an ordered calibration matrix generationmodule configured to generate an ordered calibration matrix according tospatial down-sampling points of a hyperspectral video camera; a datamatrix generation module configured to convert the spectral video andthe RGB video into a data matrix in a parallel manner according to theordered calibration matrix; a spectral data parallel computation unitconfigured to copy a spectral ordered calibration matrix and thespectral video into a parallel computation memory, and perform threadindexing to control the computation of each spectral data point; an RGBdata parallel computation unit configured to copy the RGB video into theparallel computation memory and perform thread indexing to control thecomputation of each RGB data point; a calibration point acquisitionmodule configured to acquire all related calibration points of areconstruction region according to the ordered calibration matrix; and ahyperspectral video reconstruction module configured to reconstruct ahyperspectral video in a parallel manner according to the relatedcalibration points and the data matrix.